#!/bin/sh
#
# rm -- remove a docker lab
#
# Copyright (C) 2016-2020 Wu Zhangjin <lzufalcon@163.com>
#

uname | grep -q MINGW && PWD_OPT="-W"
TOP_DIR="$(cd "$(dirname "$0")"/../../ && pwd $PWD_OPT)"
. "$TOP_DIR/tools/docker/config" $* >/dev/null

notify_user 2 "Lab will be removed"

# Remove container
do_op "docker rm -f" CONTAINER_NAME

# Remove desktop shortcut
do_op "rm -f" LOCAL_DESKTOP_SHORTCUT

# Update lab list
[ "$RELEASE" != '0' ] && "$DOCKER_RELEASE_CMD" all >/dev/null 2>&1
